package com.gmadmin.utils.jwt;

/**
 * @author zhangliang
 * @version 1.0
 * @date 2021/2/3 15:13
 */

import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.stereotype.Component;

/**
 * JWT 配置文件类
 *
 * @author zhangliang
 * @version 1.0
 * @date 2021/1/25 9:07
 */
@ConfigurationProperties(prefix = "jwt.config")
@Component
public class JwtConfig {
    /**
     * jwt 加密 key，默认值：gmadmin.
     */
    private String key = "gmadmin";

    /**
     * jwt 过期时间，默认值：3600000 {@code 60 分钟}.
     */
    private Long ttl = 3600000L;

    /**
     * 开启 记住我 之后 jwt 过期时间，默认值 604800000 {@code 7 天}
     */
    private Long remember = 604800000L;



    public String getKey() {
        return key;
    }

    public void setKey(String key) {
        this.key = key;
    }

    public Long getTtl() {
        return ttl;
    }

    public void setTtl(Long ttl) {
        this.ttl = ttl;
    }

    public Long getRemember() {
        return remember;
    }

    public void setRemember(Long remember) {
        this.remember = remember;
    }


}
